package cn.com.hnisi.springldap;

import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 
 * @author yanping
 * 
 */
public class LdapMain {

	private static final String APPLICATION_CONTEXT_PATH = "cn/com/hnisi/springldap/applicationContext.xml";

	public static void main(String[] args) {
		ApplicationContext cxt = new ClassPathXmlApplicationContext(
				APPLICATION_CONTEXT_PATH);
		PersonDaoLdapImpl userDao = (PersonDaoLdapImpl) cxt
				.getBean("personDao");
		// List<String> users = userDao.getAllPersonNames();
		// for (String user : users) {
		// System.out.println(user);
		// }
		List<Person> persons = userDao.getAllPersons();
		System.out.println(persons.size());
		// XmlOp.export2Xml(persons);
	}
}
